package com.wk1un2.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.wk1un2.entity.ProductSpec;
import com.wk1un2.mapper.ProductSpecMapper;
import com.wk1un2.service.ProductSpecService;

/**
 * 业务接口的实现类
 * 
 * @author Administrator
 *
 */
@Service // 扫描
public class ProductSpecServiceImpl implements ProductSpecService {

	@Autowired
	private ProductSpecMapper ProductSpecMapper;// 自动注入mapper

	@Override
	public List<Map<String, Object>> getAll(int page, int limit, String ps_color, String ps_price) {
		// TODO Auto-generated method stub
		return ProductSpecMapper.getAll(page, limit, ps_color, ps_price);
	}
	@Override
	public List<Map<String, Object>> getAllindex(int page, int limit, Integer p_id) {
		// TODO Auto-generated method stub
		return ProductSpecMapper.getAllindex(page, limit,p_id);
	}
	@Override
	public Integer count() {
		// TODO Auto-generated method stub
		return ProductSpecMapper.count();
	}

	@Override
	public Integer add(Map<String, Object> map) {
		// TODO Auto-generated method stub
		return ProductSpecMapper.add(map);
	}

	@Override
	public Integer update(Map<String, Object> map) {
		// TODO Auto-generated method stub
		return ProductSpecMapper.update(map);
	}

	@Override
	public Integer delete(int ps_id) {
		// TODO Auto-generated method stub
		return ProductSpecMapper.delete(ps_id);
	}

}
